﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true"
    CodeBehind="SalesTeam.aspx.cs" Inherits="Client_Revenue.SalesTeam1" %>

<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
    <ContentTemplate>
        <table style="text-align: justify; vertical-align: text-top; padding: 0px; margin: 20px 20px 20px 0px;">
            <tr>
                <td>
                <h4>Client - Producer commissions </h4>
                    <asp:GridView ID="gvSalesInfo" runat="server" AutoGenerateColumns="False" 
                        onpageindexchanged="gvSalesInfo_PageIndexChanged" 
                        onrowediting="gvSalesInfo_RowEditing" 
                        onselectedindexchanged="gvSalesInfo_SelectedIndexChanged" 
                        EditRowStyle-BorderColor="LightGray" 
                        onrowcancelingedit="gvSalesInfo_RowCancelingEdit" 
                        onrowupdating="gvSalesInfo_RowUpdating" 
                        onselectedindexchanging="gvSalesInfo_SelectedIndexChanging">
                        <Columns>
                            <asp:TemplateField HeaderText="Producer" SortExpression="Name">
                               <ItemTemplate>
                                    <asp:Label ID="Label4" runat="server" Text='<%# Bind("Name") %>'></asp:Label>
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="Client" SortExpression="ClientName">
                               <ItemTemplate>
                                    <asp:Label ID="Label5" runat="server" Text='<%# Bind("ClientName") %>'></asp:Label>
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="Amount Allocated" SortExpression="AmountAllocated">
                                <EditItemTemplate>
                                    <asp:TextBox ID="txtRevType" runat="server" Text='<%# Bind("AmountAllocated","{0:c}") %>'></asp:TextBox>
                                </EditItemTemplate>
                                <ItemTemplate>
                                    <asp:Label ID="Label1" runat="server" Text='<%# Bind("AmountAllocated","{0:c}") %>'></asp:Label>
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="Commission (%)" SortExpression="Commission">
                                <EditItemTemplate >
                                    <asp:TextBox ID="txtComm" runat="server" Text='<%# Bind("Commission")  %>'></asp:TextBox>
                                </EditItemTemplate>
                                <ItemTemplate>
                                    <asp:Label ID="Label2" runat="server" Text='<%# Bind("Commission") %>'></asp:Label>
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="Consulting Fee">
                                <EditItemTemplate>
                                    <asp:TextBox ID="txtFee" runat="server" Text='<%# Bind("Fee","{0:c}") %>'></asp:TextBox>
                                </EditItemTemplate>
                                <ItemTemplate>
                                    <asp:Label ID="Label3" runat="server" Text='<%# Bind("Fee","{0:c}") %>'></asp:Label>
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="Date Contracted" SortExpression="StartDate">
                                <ItemTemplate>
                                    <asp:Label ID="Label6" runat="server" Text='<%# Bind("StartDate",  "{0:d}") %>'></asp:Label>
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:BoundField DataField="ReceiptDate" DataFormatString="{0:d}" 
                                HeaderText="ReceiptDate" SortExpression="ReceiptDate" />
                            <asp:CommandField ShowEditButton="true" />
                        </Columns>

                        <EditRowStyle BorderColor="LightGray" />

                    </asp:GridView>
                </td>
            </tr>
        </table>
        </ContentTemplate>
    </asp:UpdatePanel>
</asp:Content>
